#if(autocodeModel.list_type=="ztree")
/*************
 *#(model)列表
**************/
public List<#(component)#(model)> get#(model)List(#if(parent)Integer #(firstLowerCase(parent.code))_id#end){
	return #(component)#(model).dao.find("select id,parent_id as pId,name,num from "+#(component)#(model).tablename+" where #if(parent)#(firstLowerCase(parent.code))_id="+#(firstLowerCase(parent.code))_id+"#else 1=1 #end  order by sort asc,id asc");
}
/*************
 *#(model)检查是否存在子内容
**************/
public boolean checkChild#(model)(Integer parent_id){
	if(#(component)#(model).dao.findFirst("select id from "+#(component)#(model).tablename+" where parent_id=?",parent_id)!=null){
		return false;
	}
	return true;
}
#else
/*************
 *#(model)分页
**************/
public Page<#(component)#(model)> get#(model)Page(Client client,Map<String,String[]> paramMap){
	#if(autocodeModel.list_type=="ztree+table")
	#if(autocodeModel.search)
	String[][] param = new String[][]{
		new String[]{"num",like_left,"B.num"}
		#for(item:columnList)#if(item.search)
		,new String[]{"#(item.column)",#(item.search),"#(item.column)"}
		#end#end
	};
	#end
	Page<#(component)#(model)> pd = #(component)#(model).dao.paginate(
			getParaToInt(paramMap, client.getPageNumber(), 1), 
			getParaToInt(paramMap,client.getPageSize(),20),
			"select A.*,B.name as #(firstLowerCase(parent.code))_name",
			"from "+#(class).tablename+" A #if(parent)left join "+#(component)#(parent.code).tablename+" B ON A.#(firstLowerCase(parent.code))_id=B.id#end  where 1=1 "
			#if(autocodeModel.search)+ whereSql(paramMap,param)#end	
			+ orderby("A.",client, paramMap)#if(autocodeModel.search),whereParam(paramMap, param)#end);
	#else
	String[][] param = new String[][]{
	#if(autocodeModel.search)#set(whereParamSeq = 1)#for(item:columnList)#if(item.search)#if(whereParamSeq>1)
				,#end#set(whereParamSeq = 2)new String[]{"#(item.column)",#(item.search),"#(item.column)"}#end#end
		#if(parent),new String[]{"#(firstLowerCase(parent.code))_id",eq,"#(firstLowerCase(parent.code))_id"}#end#end
	};
	Page<#(component)#(model)> pd = #(component)#(model).dao.paginate(
			getParaToInt(paramMap, client.getPageNumber(), 1), 
			getParaToInt(paramMap,client.getPageSize(),20),
			"select *","from "+#(class).tablename+" where 1=1 " 				
			#if(autocodeModel.search)+ whereSql(paramMap,param)#end
			+ orderby(client, paramMap)#if(autocodeModel.search),whereParam(paramMap, param)#end);
	#end
#if(autocodeModel.change)
	changeBasedata(pd.getList()#for(item:columnList)#if(item.change)
		, new String[]{"#(item.column)","#(item.change)"}#end#end);#end
	return pd;
}
#end